package com.ruoyi.cderp.mapper;

import java.util.Date;
import java.util.List;

import com.ruoyi.cderp.domain.CustomerSettleCheckSheetDetail;
import com.ruoyi.cderp.domain.CustomerSettleSheet;
import com.ruoyi.cderp.domain.CustomerSettleSheetDetail;
import org.apache.ibatis.annotations.Param;

/**
 * 客户结算单Mapper接口
 *
 * @author ruoyi
 * @date 2025-03-11
 */
public interface CustomerSettleSheetMapper
{
    /**
     * 查询客户结算单
     *
     * @param id 客户结算单主键
     * @return 客户结算单
     */
    public CustomerSettleSheet selectCustomerSettleSheetById(String id);

    /**
     * 查询客户结算单列表
     *
     * @param customerSettleSheet 客户结算单
     * @return 客户结算单集合
     */
    public List<CustomerSettleSheet> selectCustomerSettleSheetList(CustomerSettleSheet customerSettleSheet);

    /**
     * 新增客户结算单
     *
     * @param customerSettleSheet 客户结算单
     * @return 结果
     */
    public int insertCustomerSettleSheet(CustomerSettleSheet customerSettleSheet);

    /**
     * 修改客户结算单
     *
     * @param customerSettleSheet 客户结算单
     * @return 结果
     */
    public int updateCustomerSettleSheet(CustomerSettleSheet customerSettleSheet);

    /**
     * 删除客户结算单
     *
     * @param id 客户结算单主键
     * @return 结果
     */
    public int deleteCustomerSettleSheetById(String id);

    /**
     * 批量删除客户结算单
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCustomerSettleSheetByIds(String[] ids);

    /**
     * 批量删除客户结算单明细
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCustomerSettleSheetDetailBySheetIds(String[] ids);

    /**
     * 批量新增客户结算单明细
     *
     * @param customerSettleSheetDetailList 客户结算单明细列表
     * @return 结果
     */
    public int batchCustomerSettleSheetDetail(List<CustomerSettleSheetDetail> customerSettleSheetDetailList);


    /**
     * 通过客户结算单主键删除客户结算单明细信息
     *
     * @param id 客户结算单ID
     * @return 结果
     */
    public int deleteCustomerSettleSheetDetailBySheetId(String id);

    //查询客户对账信息
    List<CustomerSettleSheetDetail> selectCustomerSettleCheckList(@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("customerId") String customerId);

    //查询客户结算详情
    List<CustomerSettleSheetDetail> selectCustomerSettleDetail(String sheet_id);

}
